package com.supreme.studyserver.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class BaseMapperAOP {

    @Pointcut(value = "execution(* com.baomidou.mybatisplus.core.mapper.BaseMapper.*(..))")
    public void PointCut() {
    }

    @Around("PointCut()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info("BaseMapperAOP around");
        return joinPoint.proceed();
    }
}
